//
//  AMSearchView.h
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOBaseView.h"
#import "HOBaseResponseEntity.h"
#import "HODefine.h"

@protocol AMSearchViewDelegate <NSObject>

- (void)searchStatusDidChange:(HO_SEARCH_STATUS)status;
- (void)gotoSearchKey:(NSString *)key;
@end

@interface HOSearchView : HOBaseView<UISearchBarDelegate>
{
    UISearchBar          *searchBar;
    UITableView          *searchTableView;
    UIView               *bgView;
    UIImageView          *noResultImgView;
}
@property(nonatomic, retain)NSMutableArray             *dataList;
@property(nonatomic, retain)NSString            *action;
@property(nonatomic, assign)HO_SEARCH_STATUS    searchStatus;
@property(nonatomic, assign)id<AMSearchViewDelegate> delegate;

- (void)openSearchView;
- (void)closeSearchView;
- (void)setTableViewDataSource:(id<UITableViewDataSource>)tableViewDataSourceDelegate;
- (void)setTableViewDelegate:(id<UITableViewDelegate>)tableViewDelegate;
- (void)reloadData;
- (UISearchBar *)getSearchBar;
- (UITableView *)getTableView;
- (UIView *)getBgView;

@end
